#!python

# vPresent is an immersive presentation creation and display application.
# Copyright (C) 2007-2009 by Priority 5 Holdings, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

import os
import SCons
import SConsAddons.Util as sca_util

Import('*')
env = common_env.Copy()

boost_options.apply(env)
platform = GetPlatform()
if platform == 'linux':
   win_sys = 'WindowX'
elif platform == 'win32':
   win_sys = 'WindowWin32'
elif platform == 'darwin':
   win_sys = 'WindowCocoa'
else:
   win_sys = ''

opensg_options.apply(env, ['Cluster', 'Util', 'FileIO', win_sys],
                     buildType = 'opt')

src_files = []
for path, dirs, files in sca_util.WalkBuildFromSource('.', env):
   src_files += [os.path.join(path, f) for f in files if f.endswith('.cpp')]

vpresent_server = env.Program('vpresent-server', src_files)
env.Install(base_paths['sbin'], vpresent_server)
env.Install(base_paths['sbin'], ['vpresentd'])
